package com.iwop.moto.service.impl;

import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.FVerService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/9/6.
 */
@Service
public class FVerServiceImpl extends BaseService implements FVerService{

    @Override
    public void insertFVer(SuperRecordModel SRModel) {
         getSqlSession().insert("FVerMapper.insertFVer", SRModel);
    }

    @Override
    public void upFVer(SuperRecordModel SRModel) {
        getSqlSession().update("FVerMapper.updateFVer", SRModel);
    }

    @Override
    public List<SuperRecordModel> getFVer(SuperRecordModel SRModel) {
       return getSqlSession().selectList("FVerMapper.selectFVers", SRModel);
    }

    @Override
    public SuperRecordModel getFVerDetail(SuperRecordModel SRModel) {
        return getSqlSession().selectOne("FVerMapper.selectFVer", SRModel);
    }

    @Override
    public void upFVerStatus(SuperRecordModel SRModel) {
        getSqlSession().update("FVerMapper.upFVerStatus", SRModel);
    }

    @Override
    public SuperRecordModel findFverBySid(SuperRecordModel srModel) {
        return  getSqlSession().selectOne("FVerMapper.findFverBySid",srModel);
    }

    @Override
    public SuperRecordModel isExist(SuperRecordModel srModel) {
        return getSqlSession().selectOne("FVerMapper.isExist",srModel);
    }

    @Override
    public SuperRecordModel getFVerByRepeat(SuperRecordModel srModel) {
        return getSqlSession().selectOne("FVerMapper.getFVerByRepeat",srModel);
    }

    @Override
    public int deleteFVer(SuperRecordModel superRecordModel) {
        return getSqlSession().delete("FVerMapper.deleteFVer", superRecordModel);
    }

    @Override
    public SuperRecordModel findFVerByType(SuperRecordModel srModel) {
        return getSqlSession().selectOne("FVerMapper.findFVerByType",srModel);
    }
}
